From 7f80ee3a38e0e217b0e3f5886a79fe175a8a6913 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 25 Oct 2011 22:19:11 +0200 Subject: [PATCH] gtkrc.key.mac: add Command-cursor text navigation and some emacs-ish Control bindings that work in native widgets. Patch from Michael Hutchinson. (cherry picked from commit ccf12f7b406ecbd8f0c26b0e6dc86d4593144dab) --- gtk/gtkrc.key.mac | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gtk/gtkrc.key.mac b/gtk/gtkrc.key.mac index e6ec0e8fe1..631e0dd7a7 100644 --- a/gtk/gtkrc.key.mac +++ b/gtk/gtkrc.key.mac @@ -83,6 +83,41 @@ binding "gtk-mac-entry" class "GtkEntry" binding "gtk-mac-entry" +binding "gtk-mac-cmd-arrows" +{ + bind "Left" { "move-cursor" (paragraph-ends, -1, 0) } + bind "KP_Left" { "move-cursor" (paragraph-ends, -1, 0) } + bind "Left" { "move-cursor" (paragraph-ends, -1, 1) } + bind "KP_Left" { "move-cursor" (paragraph-ends, -1, 1) } + bind "Right" { "move-cursor" (paragraph-ends, 1, 0) } + bind "KP_Right" { "move-cursor" (paragraph-ends, 1, 0) } + bind "Right" { "move-cursor" (paragraph-ends, 1, 1) } + bind "KP_Right" { "move-cursor" (paragraph-ends, 1, 1) } +} + +class "GtkTextView" binding "gtk-mac-cmd-arrows" +class "GtkLabel" binding "gtk-mac-cmd-arrows" +class "GtkEntry" binding "gtk-mac-cmd-arrows" + + +binding "gtk-mac-emacs-like" +{ + bind "a" { "move-cursor" (paragraph-ends, -1, 0) } + bind "a" { "move-cursor" (paragraph-ends, -1, 1) } + bind "e" { "move-cursor" (paragraph-ends, 1, 0) } + bind "e" { "move-cursor" (paragraph-ends, 1, 1) } + + bind "b" { "move-cursor" (logical-positions, -1, 0) } + bind "b" { "move-cursor" (logical-positions, -1, 1) } + bind "f" { "move-cursor" (logical-positions, 1, 0) } + bind "f" { "move-cursor" (logical-positions, 1, 1) } +} + +class "GtkTextView" binding "gtk-mac-emacs-like" +class "GtkLabel" binding "gtk-mac-emacs-like" +class "GtkEntry" binding "gtk-mac-emacs-like + + binding "gtk-mac-file-chooser" { bind "v" { "location-popup-on-paste" () } -- 2.30.2